<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /*     班10个学生的成绩，求和并求平均分  */
        let i = 0;
        let score = 0;
        let sum = 0;
        while (i < 10) {
            score = parseInt(prompt("请输入学生的成绩(只能输入10次)"));

            sum = sum + score;
            i++;
        }
        let agv = sum / 10;
        console.log(agv);
    </script>
</body>

</html>